#!/usr/bin/env python3
# -*- coding:utf-8 -*-
"""
    匿名函数：lambda
"""
l = list(map(lambda x: x * x, range(1, 10)))
print(l)

f = lambda x, y: x + y
print(f)
print((lambda x, y: x + y)(10, 3))
print(f(10, 3))


def build(x):
    return lambda y: x * y


for i in range(1, 5):
    l = list(map(build(i), range(1, 5)))
    print(l)

l = list(filter(lambda x: x % 2 == 1, range(1, 20)))
print(l)
